package com.ybwh.springboot2.example;

import com.ybwh.springboot2.common.enums.EnumField;
import com.ybwh.springboot2.common.jackson.mask.MaskField;
import com.ybwh.springboot2.enums.HobyEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * 描述信息
 *
 * @author fanbeibei
 * @version 1.0
 * @date 2020/9/7 17:14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Person extends Base {
    private Base base;

    @MaskField(beginIndex = 4,endIndex = 8,maskChar = '#')
    private String name;
    private Integer age;


    private LocalDateTime birthday;

    @NotBlank
    @EnumField(value = HobyEnum.class,message = "hoby值错误")
    private String hoby;

}
